﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using FluentNHibernate.Mapping;
using Thaire.Investment.Domains.Transaction;

namespace Thaire.Investment.Repository.Mapping
{
    class FixIncomeSecuritiesTransactionMap : ClassMap<FixIncomeSecuritiesTransaction>
    {

        public FixIncomeSecuritiesTransactionMap()
        {
            Table("FIXINCOMESECURITIES_TRANSACTION");
            Id(x => x.TransactionID, "TRANSACTION_ID").GeneratedBy.Identity();

            Map(x => x.FixincomesecuritiesHeaderID, "FIXINCOMESECURITIES_HEADER_ID");
            Map(x => x.PurchaseID, "PURCHASE_ID");
            Map(x => x.TransactionType, "TRANSACTION_TYPE");
            Map(x => x.Unit, "UNIT");
            Map(x => x.Yield, "YIELD");
            Map(x => x.CounterpartyName, "COUNTERPARTY_NAME");
            Map(x => x.CounterpartyID, "COUNTERPARTY_ID");
            Map(x => x.Cleanprice, "CLEANPRICE");
            Map(x => x.TypeofpaymentName, "TYPEOFPAYMENT_NAME");
            Map(x => x.TypeofpaymentID, "TYPEOFPAYMENT_ID");
            Map(x => x.AI, "AI");
            Map(x => x.RefNO, "REF_NO");
            Map(x => x.GrossPrice, "GROSS_PRICE");
            Map(x => x.CreateUserId, "CREATE_USER_ID");
            Map(x => x.CreateTs, "CREATE_TS");
            Map(x => x.TradeDate, "TRADE_DATE");
            Map(x => x.SettlementDate, "SETTLEMENT_DATE");

            Map(x => x.Obligation, "OBLIGATION");
            Map(x => x.ObligationNO, "OBLIGATION_NO");
            Map(x => x.GuaranteeType, "GUARANTEE_TYPE");
            Map(x => x.GuaranteeStartDate, "GUARANTEE_STARTDATE");
            Map(x => x.GuaranteeEndDate, "GUARANTEE_ENDDATE");


            Map(x => x.Physical, "PHYSICAL");
            Map(x => x.KeepAt, "KEEP_AT");
            Map(x => x.BookCount, "BOOK_COUNT");
            Map(x => x.BookNo, "BOOK_NO");


        }


    }
}
